<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/templateInventario.xhtml">


<ui:define name="body">

    <h:form id="invProveedorSearch" styleClass="edit">

        <rich:simpleTogglePanel label="Filtro de busqueda " switchType="ajax">

		<s:decorate template="layout/display.xhtml">
                <ui:define name="label">Proveedor</ui:define>
                <h:inputText id="proNombre" value="#{invProveedorList.invProveedor.proNombre}" style=" height : 22px;"/>
            </s:decorate>


            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Direccion</ui:define>
                <h:inputText id="proDireccion" value="#{invProveedorList.invProveedor.proDireccion}" style=" height : 14px;"/>
            </s:decorate>

            
            <s:decorate template="layout/display.xhtml">
                <ui:define name="label">Telefono</ui:define>
                <h:inputText id="proTelefono" value="#{invProveedorList.invProveedor.proTelefono}"/>
            </s:decorate>


        </rich:simpleTogglePanel>

        <div class="actionButtons">
            <h:commandButton id="search" value="Buscar" action="/InvProveedorList.xhtml"/>
            <s:button id="reset" value="Limpiar" includePageParams="false"/>
            <h:commandButton id="reporte" value="Reporte" action="/ReporteProveedores.xhtml"/>
        </div>


    </h:form>

    <rich:panel>
        <f:facet name="header">Resultado de busqueda</f:facet>
    <div class="results" id="invProveedorList">

    <h:outputText value="No hay resultados de busqueda !!!"
               rendered="#{empty invProveedorList.resultList}"/>

    <rich:dataTable id="invProveedorList"
                var="_invProveedor"
              value="#{invProveedorList.resultList}"
           rendered="#{not empty invProveedorList.resultList}">
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{invProveedorList}"/>
                    <ui:param name="propertyLabel" value="Identificador"/>
                    <ui:param name="propertyPath" value="invProveedor.proCodigo"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_invProveedor.proCodigo}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{invProveedorList}"/>
                    <ui:param name="propertyLabel" value="Direccion"/>
                    <ui:param name="propertyPath" value="invProveedor.proDireccion"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_invProveedor.proDireccion}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{invProveedorList}"/>
                    <ui:param name="propertyLabel" value="Proveedor"/>
                    <ui:param name="propertyPath" value="invProveedor.proNombre"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_invProveedor.proNombre}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <ui:include src="layout/sort.xhtml">
                    <ui:param name="entityList" value="#{invProveedorList}"/>
                    <ui:param name="propertyLabel" value="Telefono"/>
                    <ui:param name="propertyPath" value="invProveedor.proTelefono"/>
                </ui:include>
            </f:facet>
            <h:outputText value="#{_invProveedor.proTelefono}"/>
        </h:column>
        <rich:column styleClass="action">
            <f:facet name="header">Acciiones</f:facet>
            <s:link view="/#{empty from ? 'InvProveedor' : from}.xhtml"
                   value="#{empty from ? 'Ver' : 'Seleccionar'}"
             propagation="#{empty from ? 'none' : 'default'}"
                      id="invProveedor">
                <f:param name="invProveedorProCodigo"
                        value="#{_invProveedor.proCodigo}"/>
            </s:link>
            #{' '}
            <s:link view="/InvProveedorEdit.xhtml"
                   value="Edit"
             propagation="none"
                      id="invProveedorEdit"
                rendered="#{empty from}">
                <f:param name="invProveedorProCodigo"
                        value="#{_invProveedor.proCodigo}"/>
            </s:link>
        </rich:column>
    </rich:dataTable>

    </div>
    </rich:panel>

    <div class="tableControl">

        <s:link view="/InvProveedorList.xhtml"
            rendered="#{invProveedorList.previousExists}"
               value="#{messages.left}#{messages.left} First Page"
                  id="firstPage">
          <f:param name="firstResult" value="0"/>
        </s:link>

        <s:link view="/InvProveedorList.xhtml"
            rendered="#{invProveedorList.previousExists}"
               value="#{messages.left} Previous Page"
                  id="previousPage">
            <f:param name="firstResult"
                    value="#{invProveedorList.previousFirstResult}"/>
        </s:link>

        <s:link view="/InvProveedorList.xhtml"
            rendered="#{invProveedorList.nextExists}"
               value="Next Page #{messages.right}"
                  id="nextPage">
            <f:param name="firstResult"
                    value="#{invProveedorList.nextFirstResult}"/>
        </s:link>

        <s:link view="/InvProveedorList.xhtml"
            rendered="#{invProveedorList.nextExists}"
               value="Last Page #{messages.right}#{messages.right}"
                  id="lastPage">
            <f:param name="firstResult"
                    value="#{invProveedorList.lastFirstResult}"/>
        </s:link>

    </div>

    <s:div styleClass="actionButtons" rendered="#{empty from}">
        <s:button view="/InvProveedorEdit.xhtml"
                    id="create"
           propagation="none"
                 value="Crear proveedor">
            <f:param name="invProveedorProCodigo"/>
        </s:button>
    </s:div>

</ui:define>

</ui:composition>
